package com.way.miweather;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.way.weather.plugin.WeatherSpiderFactory;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		WeatherSpiderFactory factory = WeatherSpiderFactory.getInstance(this,
				"101010100");
		final WeatherSpiderFactory.ISpider spider = factory.getAvailableSpiders();
		new Thread(new Runnable() {
			
			@Override
			public void run() {
				spider.generateWeatherInfos();
				Log.i("liweiping", spider.getAlerts().toString());
				Log.i("liweiping", spider.getRealtime().toString());
				Log.i("liweiping", spider.getAqi().toString());
				Log.i("liweiping", spider.getForecast().toString());
				Log.i("liweiping", spider.getIndex().toString());
			}
		}).start();
	}

}
